<?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Controllers\Controller;
use App\Models\SiteConfig;
use Illuminate\Http\Request;

class HomeController extends Controller
{
    public function home(Request $request){
        $box_price = SiteConfig::where('option_name', 'box_price')->value('option_value');
        $people_number = SiteConfig::where('option_name', 'people_number')->value('option_value');
        $data =[
            'box_price'=> $box_price,
            'people_number'=> $people_number - 1,
        ];
        return response()->json(['code' => 1,'msg' => 'Success','data' => $data]);
    }
}
